package org.example.config;

import govern.monitor.boot.config.YamlPropertyLoaderFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.PropertySource;

import javax.annotation.PostConstruct;

@AutoConfiguration
@PropertySource(value = {"classpath:opensabre-config.yml"}, encoding = "UTF8", factory = YamlPropertyLoaderFactory.class)
public class OpensabreConfig {

    @Value("${spring.cloud.nacos.config.server-addr}")
    private String configServer;

    @PostConstruct
    public void init() {
        System.out.println(configServer);
    }

}
